<?php
#string number_format 
#( float $number [, int $decimals = 0 ] )

$number = 123456789.87654;

echo number_format($number,2);
//123,456,789.88
// If you don't like above output and you want to make seperator custom
echo '<br>';
//string number_format
//( float $number , int $decimals = 0 ,
//string $decimal_seperator = '.' ,
//string $thousands_sep = ',' )
echo number_format($number, 3, ',' ,' ');
